package com.example.hissys.mapper;

import com.example.hissys.entity.Doctor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;

@Mapper
public interface DoctorMapper {
    /**
     * 根据部门ID查询医生列表
     * @param departmentId 部门ID
     * @return 医生列表
     */
    @Select("SELECT * FROM doctors WHERE department_id = #{departmentId}")
    List<Doctor> findByDepartmentId(Integer departmentId);

    /**
     * 根据ID查询医生详情
     * @param id 医生ID
     * @return 医生信息
     */
    @Select("SELECT * FROM doctors WHERE id = #{id}")
    Doctor findById(Integer id);
} 